package com.qiguliuxing.dts.common.type;

import lombok.Getter;

/**
 * 佣金账务类型的枚举类
 * 
 * @author qiguliuxing
 * @QQ 623659388
 * @since 1.0.0
 */
@Getter
public enum BrokerageTypeEnum {

	// 系统自动结算
	SYS_APPLY((byte) 0, "系统结算自动申请"),

	// 用户手工发起申请
	USER_APPLY((byte) 1, "用户手工申请");

	private Byte type;
	private String desc;

	BrokerageTypeEnum(Byte type, String desc) {
		this.type = type;
		this.desc = desc;
	}

	public static BrokerageTypeEnum getInstance(Byte type2) {
		if (type2 != null) {
			for (BrokerageTypeEnum tmp : BrokerageTypeEnum.values()) {
				if (tmp.type.intValue() == type2.intValue()) {
					return tmp;
				}
			}
		}
		return null;
	}
}
